package cn.itcast.bassm.util;

import java.text.SimpleDateFormat;
import java.util.Date;

import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.springframework.beans.factory.annotation.Autowired;

import cn.itcast.bassm.mapper.UserMapper;
import cn.itcast.bassm.service.UserService;

public class QuartMail implements Job{
	private static String urlquery="http://192.168.1.135:8080/api/v1/alarm/query";
	@Autowired
	private UserMapper mapper;
	
	public void execute(JobExecutionContext arg0) throws JobExecutionException {	
		try {
			String yindex="0";
			Date data=new Date();
	        SimpleDateFormat dateFormat=new SimpleDateFormat("yyyy-MM-dd");
	        String idnumber = dateFormat.format(data);
	        mapper.UpselectFintotime(yindex, idnumber);
		} catch (Exception e) {		
			e.printStackTrace();
		}
		
	}

}
